Skip to content

Add response and request attributes to HTTPError #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 27, 2025

Conversation

ytinyui
Copy link
Contributor

@ytinyui ytinyui commented May 25, 2025

These attributes are added to align with the implementation in the requests library.

References:
requests.models.Response
requests.exceptions.RequestException

@thewebscraping
Copy link
Owner

Hi @ytinyui
Thank you for the suggestion! Can you help to implement the init method of the HTTPError class like this to properly call the parent class initializer with super(HTTPError, self).init(message)?

1 similar comment
@thewebscraping
Copy link
Owner

Hi @ytinyui
Thank you for the suggestion! Can you help to implement the init method of the HTTPError class like this to properly call the parent class initializer with super(HTTPError, self).init(message)?

@ytinyui
Copy link
Contributor Author

ytinyui commented May 26, 2025

Do you mean we should create a RequestException class which HTTPError inherits?

@thewebscraping
Copy link
Owner

@ytinyui at HTTPError class. thanks

@ytinyui
Copy link
Contributor Author

ytinyui commented May 27, 2025

The line is added.

@thewebscraping
Copy link
Owner

@ytinyui nice, thanks

@thewebscraping thewebscraping merged commit c126ba1 into thewebscraping:main May 27, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants